Flask routes
To route multiple routes:
server.py
from flask import *
app = Flask("mapping URLs to functions")
@app.route("/")
def home():
return "Home page."
@app.route("/contact")
def contact():
return "Contact page."
app.run(debug=True)
Wither this server application running, try:
Debug mode will reboot server when file is modified (which saves you time):